package cn.edu.lingnan.service;

import cn.edu.lingnan.dao.userdao;
import cn.edu.lingnan.dao.userdaoimp;
import cn.edu.lingnan.pojo.Admin;
import cn.edu.lingnan.pojo.User;

import java.util.List;

public class userserviceimp implements userservice{
    userdao us = new userdaoimp();
    @Override
    public Admin Login(String username, String password) {
        return us.Login(username, password);
    }

    @Override
    public List<User> selectall() {

        return us.selectall( );
    }

    @Override
    public Integer register(User user) {
        user.setAge(0);
        user.setGender(" ");
        user.setMajor(" ");
        return  us.registered(user);
    }

    @Override
    public Integer deleteUser(Integer[] idsInt) {
        return us.deleteUser(idsInt);
    }

    @Override
    public User getById(Integer id) {
        return us.getById(id);
    }

    @Override
    public Integer updateUser(User user) {
        return us.updateUser(user);
    }

    @Override
    public Integer addUser(User user) {
        return us.addUser(user);
    }

    @Override
    public List<User> getUserLikeName(String name) {
        return us.getUserLikeName(name);
    }

    @Override
    public User UserLogin(String username, String password) {
        return us.UserLogin(username, password);
    }

    @Override
    public Integer EnabledAndDisabled(Integer id, Integer identity) {
        return us.EnabledAndDisabled(id, identity);
    }

    @Override
    public Integer StudentUpdate(User user) {
        return us.StudentUpdate(user);
    }

    @Override
    public Integer updateStudentPassword(Integer id, String password) {
        return us.updateStudentPassword(id, password);
    }
}
